package com.shelpe.services.scheduler.syncclient;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.shelpe.services.scheduler.dto.KeywordsDto;
import com.shelpe.services.scheduler.dto.RptKeywordDto;


@FeignClient(name="${simbasync.serviceID}", url="${simbasync.url}")
@RequestMapping(value = "/simbasync")
public interface KeywordClient {
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user_id}/adgroups/{adgroup_id}/@keyword")
	public KeywordsDto syncKeywordsByUserId(@PathVariable("user_id") long userId, @PathVariable("adgroup_id") long adgroupId);
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user}/adgroups/{adgroup_id}/@keywordscore")
	public KeywordsDto syncKeywordsScoreByUser(@PathVariable("user") long userId, @PathVariable("adgroup_id") long adgroupId);
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user}/adgroups/{adgroup_id}/@keywordscorewireless")
	public KeywordsDto syncKeywordsScoreByUserWirelessQScore(@PathVariable("user") long userId, @PathVariable("adgroup_id") long adgroupId);
	
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user_id}/campaigns/{campaign_id}/adgroups/{adgroup_id}/@rptkeyword")
	public RptKeywordDto syncRptKeywordsByUserId(@PathVariable("user_id") long userId, @PathVariable("campaign_id") long campaignId, @PathVariable("adgroup_id") long adgroupId,
			@RequestParam("start_date") String startDate, @RequestParam("end_date") String endDate, @RequestParam("type") String type, @RequestParam("record") String record);

	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user}/adgroups/{adgroup_id}/@keywordstr")
	public KeywordsDto filterKeywordsByUser(@PathVariable("user") long userId, @PathVariable("adgroup_id") long adgroupId);
	
	@RequestMapping(method = RequestMethod.GET, value = "/@keywordstr")
	public KeywordsDto deleteKeywordStrTempByEndDate();
	
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user_id}/adgroups/{adgroup_id}/@insightkeyworddata")
	public RptKeywordDto syncInsightKeywordDataByUser(@PathVariable("user_id") long userId, @PathVariable("adgroup_id") long adgroupId, @RequestParam("keywordstr") String keywordstr);
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user_id}/@rptkeywordneedsync")
	public RptKeywordDto isNeedSyncRptKeywordsByUser(@PathVariable("user_id") long userId);
	
	
	@RequestMapping(method = RequestMethod.GET, value = "/tenants/{user_id}/campaigns/{campaign_id}/adgroups/{adgroup_id}/@rptkeywordrange")
	public RptKeywordDto getSyncRptKeywordsRange(@PathVariable("user_id") long user, @PathVariable("campaign_id") long campaignId, @PathVariable("adgroup_id") long adgroupId);
	
}
